package com.jx.driving.request;

import com.jx.driving.message.TimeTerminalRequestMessage;
import com.jx.driving.protocol.terminal.annotation.ByteAnnotation;
import com.jx.driving.protocol.terminal.annotation.ObjectAnnotation;
import com.jx.driving.protocol.terminal.annotation.TerminalAnnotation;
import com.jx.driving.request.domain.Directable;
import com.jx.driving.request.domain.DynamicObject;

/**
 * 数据下行透传
 * 
 * @author shenliuyang
 *
 *         2016年8月14日下午4:07:25
 */
@TerminalAnnotation
public class Terminal0x8900Request extends TimeTerminalRequestMessage implements Directable {
    @ByteAnnotation(order = 1)
    private short type = 0x13;// 透传消息类型
    @ObjectAnnotation(order = 2)
    private DynamicObject object;// 消息内容

    public short getType() {
	return type;
    }

    public void setType(short type) {
	this.type = type;
    }

    public DynamicObject getObject() {
	return object;
    }

    public void setObject(DynamicObject object) {
	this.object = object;
    }

    @Override
    public String toString() {
	StringBuilder builder = new StringBuilder();
	builder.append("Terminal0x8900Request [type=").append(type).append(", object=").append(object).append("]");
	return builder.toString();
    }

    @Override
    public DynamicObject dynamicObject() {
	return this.object;
    }

}
